<!--{include(file='head.html')}-->
<div class="main">
	 <table cellspacing="0" cellpadding="0" border="0"  class="contentMain">
		<tr valign="top">
			<td id="whotd"><!--{include('left.html')}--></td>
			<td>
				<form action="<!--{url('admin','type','propertysave')}-->" method="post" name="submitform" id="submitform">
					<div class="add-media-mian">
						<div class="infodiv">
							<!--{if $opertype == "edit"}-->
							<table cellspacing="0" cellpadding="0" border="0">
								<tr>
										<td class="lefttd">类别名称：</td>
										<td class="righttd"><!--{$property.typename}--></td>
								</tr>
								<tr>
										<td class="lefttd">属性名称：</td>
										<td class="righttd">
											<input class="mini-input" value="<!--{$property.propertyname}-->" name="propertyname" type="text"/>
										</td>
								</tr>
								<tr>
										<td class="lefttd">表现类型：</td>
										<td class="righttd">
											<select name="dptype" id="dptype" autocomplete="off">
												<optgroup label="选择项">
													<option value="1" <!--{if $property.dptype==1}-->selected<!--{/if}-->>选择项-可筛选</option>
													<option value="2" <!--{if $property.dptype==2}-->selected<!--{/if}-->>选择项-不可筛选</option>
												</optgroup>
												<optgroup label="输入项">
													<option value="3" <!--{if $property.dptype==3}-->selected<!--{/if}-->>输入项-可筛选</option>
													<option value="4" <!--{if $property.dptype==4}-->selected<!--{/if}-->>输入项-不可筛选</option>
												</optgroup>
											</select>
										</td>
								</tr>
								<tr id="selvaltr">
										<td class="lefttd">选择项可选值：</td>
										<td class="righttd">
											<input class="short-input" 
												value="<!--{if $selval}--><!--{implode(",",$selval)}--><!--{/if}-->" name="selval" id="selval"  type="text"/>
										</td>
								</tr>
								<tr id="selvaltr">
										<td class="lefttd">显示：</td>
										<td class="righttd">
											<input value="1" name="isdp" type="checkbox" <!--{if $property.isdp==1}-->checked<!--{/if}--> />( 是否显示在商品详情页 )
										</td>
								</tr>
								<tr>
										<td class="lefttd">排序：</td>
										<td class="righttd">
											<input class="mini-input" value="<!--{$property.order}-->" name="order" type="text"/>
										</td>
								</tr>
							</table>
							<!--{elseif $opertype=="add"}-->
							<table cellspacing="0" cellpadding="0" border="0">
								<tr>
										<td class="lefttd">类别名称：</td>
										<td class="righttd"><!--{$type.typename}--></td>
								</tr>
								<tr>
										<td class="lefttd">属性名称：</td>
										<td class="righttd">
											<input class="mini-input" value="" name="propertyname" type="text"/>
										</td>
								</tr>
								<tr>
										<td class="lefttd">表现类型：</td>
										<td class="righttd">
											<select name="dptype" id="dptype">
												<optgroup label="选择项">
													<option value="1">选择项-可筛选</option>
													<option value="2">选择项-不可筛选</option>
												</optgroup>
												<optgroup label="输入项">
													<option value="3">输入项-可筛选</option>
													<option value="4">输入项-不可筛选</option>
												</optgroup>
											</select>
										</td>
								</tr>
								<tr id="selvaltr">
										<td class="lefttd">选择项可选值：</td>
										<td class="righttd">
											<input class="short-input" value="" name="selval" id="selval"  type="text"/>
										</td>
								</tr>
								<tr id="selvaltr">
										<td class="lefttd">显示：</td>
										<td class="righttd">
											<input value="1" name="isdp" type="checkbox" checked/>( 是否显示在商品详情页 )
										</td>
								</tr>
								<tr>
										<td class="lefttd">排序：</td>
										<td class="righttd">
											<input class="mini-input" value="" name="order" type="text"/>
										</td>
								</tr>
							</table>
							<!--{/if}-->
						</div>
					</div>
					<div class="submit-area">
						<input type="hidden" value="<!--{$opertype}-->" name="opertype" />
						<input type="hidden" value="<!--{if $propertyid}--><!--{$propertyid}--><!--{/if}-->" name="propertyid"/>
						<input type="hidden" value="<!--{if $typeid}--><!--{$typeid}--><!--{/if}-->" name="typeid" />
						<input type="button" class="long-button" value="保存" onclick="$.oper.submit()"/>
					</div>
				</form>
					
			</td>
		</tr>
	</table>
</div>
<!--{include(file='foot.html')}-->
<script>
$(function(){
	$("#dptype").change(function(){
		$this = $(this),value = $this.val(),$selvaltr = $("#selvaltr");
		if(value == 1 || value == 2){
			$selvaltr.show();
		} else {
			$selvaltr.hide();
		}
	});
});
</script>